package com.yingdong.logic.service;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Service;

import com.yingdong.annotation.AutoInvoke;
import com.yingdong.db.Userpet;

@Service
public class PetService {
	static Log logger = LogFactory.getLog(PetService.class);

	@AutoInvoke
	public static void init() {
		logger.info("PetService加载完成");
	}

	public static void onUserCreated(int userId) {
		Userpet userpet = new Userpet();
		userpet.setUserId(userId);
		userpet.setEntId(1);
		userpet.saveToDB();
	}
}
